Skip to content

Conversation

@aurelj
Copy link

@aurelj aurelj commented Dec 6, 2023

Currently the following code doesn't work:

#[derive(MsgPacker)]
pub struct A {
    b: Vec<u32>,
}

because Vec<T> doesn't implement Packable.

This PR changes the binary (un)packer to apply to a new MsgPackerBin wrapper type used to mark Vec<u8> that should be encoded as msgpack binary format.

This free the way to implement (Un)Packable for Vec<T> and thus allows Vec<T> to be packed as msgpack array format, fixing the above mentioned code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant